package pcjavanet.mobilesell.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class SaleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SaleExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDbidIsNull() {
            addCriterion("dbid is null");
            return (Criteria) this;
        }

        public Criteria andDbidIsNotNull() {
            addCriterion("dbid is not null");
            return (Criteria) this;
        }

        public Criteria andDbidEqualTo(Integer value) {
            addCriterion("dbid =", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotEqualTo(Integer value) {
            addCriterion("dbid <>", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThan(Integer value) {
            addCriterion("dbid >", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("dbid >=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThan(Integer value) {
            addCriterion("dbid <", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThanOrEqualTo(Integer value) {
            addCriterion("dbid <=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidIn(List<Integer> values) {
            addCriterion("dbid in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotIn(List<Integer> values) {
            addCriterion("dbid not in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidBetween(Integer value1, Integer value2) {
            addCriterion("dbid between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("dbid not between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidIsNull() {
            addCriterion("ref_goods_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidIsNotNull() {
            addCriterion("ref_goods_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidEqualTo(Integer value) {
            addCriterion("ref_goods_dbid =", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidNotEqualTo(Integer value) {
            addCriterion("ref_goods_dbid <>", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidGreaterThan(Integer value) {
            addCriterion("ref_goods_dbid >", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_goods_dbid >=", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidLessThan(Integer value) {
            addCriterion("ref_goods_dbid <", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_goods_dbid <=", value, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidIn(List<Integer> values) {
            addCriterion("ref_goods_dbid in", values, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidNotIn(List<Integer> values) {
            addCriterion("ref_goods_dbid not in", values, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_goods_dbid between", value1, value2, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefGoodsDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_goods_dbid not between", value1, value2, "refGoodsDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidIsNull() {
            addCriterion("ref_color_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidIsNotNull() {
            addCriterion("ref_color_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidEqualTo(Integer value) {
            addCriterion("ref_color_dbid =", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidNotEqualTo(Integer value) {
            addCriterion("ref_color_dbid <>", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidGreaterThan(Integer value) {
            addCriterion("ref_color_dbid >", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_color_dbid >=", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidLessThan(Integer value) {
            addCriterion("ref_color_dbid <", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_color_dbid <=", value, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidIn(List<Integer> values) {
            addCriterion("ref_color_dbid in", values, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidNotIn(List<Integer> values) {
            addCriterion("ref_color_dbid not in", values, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_color_dbid between", value1, value2, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefColorDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_color_dbid not between", value1, value2, "refColorDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidIsNull() {
            addCriterion("ref_configuration_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidIsNotNull() {
            addCriterion("ref_configuration_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidEqualTo(Integer value) {
            addCriterion("ref_configuration_dbid =", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidNotEqualTo(Integer value) {
            addCriterion("ref_configuration_dbid <>", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidGreaterThan(Integer value) {
            addCriterion("ref_configuration_dbid >", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_configuration_dbid >=", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidLessThan(Integer value) {
            addCriterion("ref_configuration_dbid <", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_configuration_dbid <=", value, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidIn(List<Integer> values) {
            addCriterion("ref_configuration_dbid in", values, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidNotIn(List<Integer> values) {
            addCriterion("ref_configuration_dbid not in", values, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_configuration_dbid between", value1, value2, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andRefConfigurationDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_configuration_dbid not between", value1, value2, "refConfigurationDbid");
            return (Criteria) this;
        }

        public Criteria andPeisongIsNull() {
            addCriterion("peisong is null");
            return (Criteria) this;
        }

        public Criteria andPeisongIsNotNull() {
            addCriterion("peisong is not null");
            return (Criteria) this;
        }

        public Criteria andPeisongEqualTo(String value) {
            addCriterion("peisong =", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongNotEqualTo(String value) {
            addCriterion("peisong <>", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongGreaterThan(String value) {
            addCriterion("peisong >", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongGreaterThanOrEqualTo(String value) {
            addCriterion("peisong >=", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongLessThan(String value) {
            addCriterion("peisong <", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongLessThanOrEqualTo(String value) {
            addCriterion("peisong <=", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongLike(String value) {
            addCriterion("peisong like", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongNotLike(String value) {
            addCriterion("peisong not like", value, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongIn(List<String> values) {
            addCriterion("peisong in", values, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongNotIn(List<String> values) {
            addCriterion("peisong not in", values, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongBetween(String value1, String value2) {
            addCriterion("peisong between", value1, value2, "peisong");
            return (Criteria) this;
        }

        public Criteria andPeisongNotBetween(String value1, String value2) {
            addCriterion("peisong not between", value1, value2, "peisong");
            return (Criteria) this;
        }

        public Criteria andUnitpriceIsNull() {
            addCriterion("unitprice is null");
            return (Criteria) this;
        }

        public Criteria andUnitpriceIsNotNull() {
            addCriterion("unitprice is not null");
            return (Criteria) this;
        }

        public Criteria andUnitpriceEqualTo(Double value) {
            addCriterion("unitprice =", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceNotEqualTo(Double value) {
            addCriterion("unitprice <>", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceGreaterThan(Double value) {
            addCriterion("unitprice >", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceGreaterThanOrEqualTo(Double value) {
            addCriterion("unitprice >=", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceLessThan(Double value) {
            addCriterion("unitprice <", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceLessThanOrEqualTo(Double value) {
            addCriterion("unitprice <=", value, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceIn(List<Double> values) {
            addCriterion("unitprice in", values, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceNotIn(List<Double> values) {
            addCriterion("unitprice not in", values, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceBetween(Double value1, Double value2) {
            addCriterion("unitprice between", value1, value2, "unitprice");
            return (Criteria) this;
        }

        public Criteria andUnitpriceNotBetween(Double value1, Double value2) {
            addCriterion("unitprice not between", value1, value2, "unitprice");
            return (Criteria) this;
        }

        public Criteria andMoneyIsNull() {
            addCriterion("money is null");
            return (Criteria) this;
        }

        public Criteria andMoneyIsNotNull() {
            addCriterion("money is not null");
            return (Criteria) this;
        }

        public Criteria andMoneyEqualTo(Double value) {
            addCriterion("money =", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyNotEqualTo(Double value) {
            addCriterion("money <>", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyGreaterThan(Double value) {
            addCriterion("money >", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyGreaterThanOrEqualTo(Double value) {
            addCriterion("money >=", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyLessThan(Double value) {
            addCriterion("money <", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyLessThanOrEqualTo(Double value) {
            addCriterion("money <=", value, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyIn(List<Double> values) {
            addCriterion("money in", values, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyNotIn(List<Double> values) {
            addCriterion("money not in", values, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyBetween(Double value1, Double value2) {
            addCriterion("money between", value1, value2, "money");
            return (Criteria) this;
        }

        public Criteria andMoneyNotBetween(Double value1, Double value2) {
            addCriterion("money not between", value1, value2, "money");
            return (Criteria) this;
        }

        public Criteria andStatusIsNull() {
            addCriterion("status is null");
            return (Criteria) this;
        }

        public Criteria andStatusIsNotNull() {
            addCriterion("status is not null");
            return (Criteria) this;
        }

        public Criteria andStatusEqualTo(Double value) {
            addCriterion("status =", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotEqualTo(Double value) {
            addCriterion("status <>", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThan(Double value) {
            addCriterion("status >", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusGreaterThanOrEqualTo(Double value) {
            addCriterion("status >=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThan(Double value) {
            addCriterion("status <", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusLessThanOrEqualTo(Double value) {
            addCriterion("status <=", value, "status");
            return (Criteria) this;
        }

        public Criteria andStatusIn(List<Double> values) {
            addCriterion("status in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotIn(List<Double> values) {
            addCriterion("status not in", values, "status");
            return (Criteria) this;
        }

        public Criteria andStatusBetween(Double value1, Double value2) {
            addCriterion("status between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andStatusNotBetween(Double value1, Double value2) {
            addCriterion("status not between", value1, value2, "status");
            return (Criteria) this;
        }

        public Criteria andMemoIsNull() {
            addCriterion("memo is null");
            return (Criteria) this;
        }

        public Criteria andMemoIsNotNull() {
            addCriterion("memo is not null");
            return (Criteria) this;
        }

        public Criteria andMemoEqualTo(String value) {
            addCriterion("memo =", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotEqualTo(String value) {
            addCriterion("memo <>", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoGreaterThan(String value) {
            addCriterion("memo >", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoGreaterThanOrEqualTo(String value) {
            addCriterion("memo >=", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLessThan(String value) {
            addCriterion("memo <", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLessThanOrEqualTo(String value) {
            addCriterion("memo <=", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoLike(String value) {
            addCriterion("memo like", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotLike(String value) {
            addCriterion("memo not like", value, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoIn(List<String> values) {
            addCriterion("memo in", values, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotIn(List<String> values) {
            addCriterion("memo not in", values, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoBetween(String value1, String value2) {
            addCriterion("memo between", value1, value2, "memo");
            return (Criteria) this;
        }

        public Criteria andMemoNotBetween(String value1, String value2) {
            addCriterion("memo not between", value1, value2, "memo");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("create_date is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("create_date is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("create_date =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("create_date <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("create_date >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("create_date >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("create_date <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("create_date <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("create_date in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("create_date not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("create_date between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("create_date not between", value1, value2, "createDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }

        public Criteria andPeisongLikeInsensitive(String value) {
            addCriterion("upper(peisong) like", value.toUpperCase(), "peisong");
            return this;
        }

        public Criteria andMemoLikeInsensitive(String value) {
            addCriterion("upper(memo) like", value.toUpperCase(), "memo");
            return this;
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}